﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1
{
    class Program
    {
        public void Lng_Kinhdo(string LngLat)
        {

            //GridView grd = new GridView();
            //grd.DataSource = truycapdl.TaoBang("Select * From Tbl_DiaDiem Where ID='"+ID+"'");
            //Lng=grd.voidSelectedRow[0].Cells[6].ToString();
            //Lng = truycapdl.TaoBang("Select Lng From Tbl_DiaDiem Where ID='" + ID + "'").ToString();
            //return Lng;

            string Lng = "";
            string[] chuoi = new string[100];
            chuoi[LngLat.Length] = LngLat;
            for (int i = 0; i < LngLat.Length; i++)
            {
                if (chuoi[i] != ",")
                {
                    Lng = Lng + chuoi[i];
                }
                else if (chuoi[i] == ",")
                {
                    i = LngLat.Length;
                }

            }
            Console.WriteLine("{0}",Lng);
           


        }
        static void Main(string[] args)
        {
            int a = 3;
            Console.WriteLine("{0}",a);
            string LngLat = "323,545";
            string Lng = "";
            string[] chuoi = new string[100];
            chuoi[LngLat.Length] = LngLat;
            for (int i = 1; i < LngLat.Length; i++)
            {
                if (chuoi[i] != ",")
                {
                    //Lng = Lng + chuoi[i];
                    Console.WriteLine("{0}", chuoi[i]);
                }
                else if (chuoi[i] == ",")
                {
                    i = LngLat.Length;
                }

            }
            Console.WriteLine("{0}", chuoi[3]);
            Console.Read();
        }
        
    }
}
